It is often desired to scale an image to an arbitrary size. It is common practice when scaling to do so independently in the horizontal and vertical directions. The images produced using such an approach, however, tend to suffer from poor image quality including jagged edges, commonly known as “stair-stepping”.
Directional interpolation improves image quality by reducing stair-stepping when scaling an image. Algorithms incorporating directional interpolation techniques analyze the local brightness-gradient characteristics of the image and perform interpolation based on those characteristics.
U.S. Pat. No. 5,579,053 to Pandel discloses a method for raster conversion by interpolating in the direction of minimum change in brightness value between a pair of points in different raster lines fixed by a perpendicular interpolation line.
U.S. Pat. No. 6,219,464 B1 to Greggain et al. discloses a method and apparatus to generate a target pixel positioned between two lines of input source data. The Greggain method includes comparing pixels of different lines of the source data in a region surrounding the target pixel and then obtaining the target pixel along a direction that has the minimum change in brightness value between a pair of pixels and a horizontal direction.
The Pandel and Greggain methods have associated disadvantages. Designed for use solely with interlaced video images, both Pandel and Greggain methods select a minimum-brightness direction for interpolation from a set of directions which do not include the horizontal direction, a basic direction for any image.
The Greggain method produces an output pixel by interpolating in the horizontal direction as a final step. This is not optimal since the horizontal direction is in general not orthogonal to the direction of minimum brightness change. Furthermore, the Greggain method, like that of Pandel, utilizes only liner interpolation techniques for producing the output pixel. Linear interpolation, acceptable for use when interpolating in the minimum-brightness change direction due to the low spatial frequencies present along that direction, is sub-optimal when interpolating in other directions due to the higher spatial frequencies of brightness change present in those directions. In the case of graphic image sources, the Pandel and Greggain methods tend to cause text overshoot or ringing that will adversely impact image quality.